using System.Collections.Generic;
using FwkLight.Domain.Query;
using FwkLight.Persistence;

namespace FwkLight.Application
{
	public class AllItemsCachedTask<T> : BaseQueryTask<T, IList<T>>
	{
		private readonly AllItemsQuery<T> _allItemsQuery;

		public AllItemsCachedTask ( INHUnitOfWorkProvider uowProvider, AllItemsQuery<T> allItemsQuery )
			: base(uowProvider)
		{
			_allItemsQuery = allItemsQuery;
		}

		protected override IDomainQuery<T, IList<T>> Query
		{
			get { return _allItemsQuery; }
		}
	}
}